﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SecurityLog.Models.AdminUserEditModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	UserEdit
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainClassContent" runat="server">
    WithSubNav
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <ul class="subnav">
        <li><%= Html.ActionLink("Back to List", "Index") %></li>
        <% if(Model.Id > 0 && Model.CanDelete) { %>
        <li><%= Html.ActionLink("Delete User", "UserDelete", new { id = Model.Id })%></li>
        <% } %>
    </ul>

  
    <h2>Create/Edit user</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.Id) %>
        
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.Name)%>
                <%= Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Initials) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.Initials)%>
                <%= Html.ValidationMessageFor(model => model.Initials) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Password) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.Password) %>
                <%= Html.ValidationMessageFor(model => model.Password) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Enabled) %>
            </div>
            <div class="editor-field">
                <%= Html.CheckBoxFor(model => model.Enabled) %>
                <%= Html.ValidationMessageFor(model => model.Password) %>
            </div>
            
            <p>
                <input type="submit" value="Save" />
            </p>

    <% } %>

</asp:Content>

